#include<bits/stdc++.h>
using namespace std;

string makeSmallestPalindrome(string s)
{
    int l = 0, r = s.size()-1;
    while(l < r)
    {
        if(s[l] != s[r])
            s[l] = s[r] = min(s[l], s[r]);
        l++, r--;
    }
    return s;
}

int main()
{
	string s;
	cin>>s;
	cout<<makeSmallestPalindrome(s);
	return 0;
}

